<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@include file="/public/base.jspf"%>
<!DOCTYPE html>
<html>
<head>
	<title>商品类型</title>
	<%@include file="/public/base_css.jspf"%>
	<%@include file="/public/base_js.jspf"%>
</head>
<body>
	<table id="datagrid_list"></table>
	<script type="text/javascript">
		$('#datagrid_list').treegrid({
			url:'pageList',
	        loadFilter:function(data){
	        	return data.obj;
	        },
	        fitColumns:true,
	        rownumbers:true,
		    singleSelect:true,
	        idField:'id',
	        treeField:'text',
	        toolbar: [{
				iconCls: 'icon-add',
				text:'添加类型',
				handler: function(){add();}
			},'-',{
				iconCls: 'icon-edit',
				text: '修改类型',
				handler: function(){update();}
			},'-',{
				iconCls: 'icon-cancel',
				text: '删除',
				handler: function(){del();}
			}],
	        columns:[[{
	        	title:'分类名称',
	        	field:'text',
	        	width:180
	        },{
	        	title:'创建时间',
	        	field:'createTime',
	        	width:180
	        },{
	        	title:'修改时间',
	        	field:'editTime',
	        	width:180
	        }]]
		});

		function add(){
			createWindown('editPage/0','添加类型',320,310);
		}

		function update(){
			createUpdateWindown('datagrid_list','editPage','修改类型',320,310);
		}

		function del(){
			createDelDialog('datagrid_list','manage','删除','确认删除本条数据吗？');
		}
	</script>
</body>
</html>